
package com.service;

import com.baomidou.mybatisplus.service.IService;
import com.entity.OverallProgressEntity;
import com.entity.LearningProgressEntity; // 引入 LearningProgressEntity
import com.entity.LessonEntity; // 引入 LessonEntity

import java.util.List;

public interface OverallProgressService extends IService<OverallProgressEntity> {

    /**
     * 根据用户ID和课程ID获取整体进度
     * @param userId 用户ID
     * @param courseId 课程ID
     * @return 整体进度实体，如果不存在则返回null
     */
    OverallProgressEntity getOverallProgressByUserIdAndCourseId(Long userId, Long courseId);

    /**
     * 计算并更新/保存用户的整体课程学习进度
     * @param userId 用户ID
     * @param courseId 课程ID
     */
    void calculateAndSaveOverallProgress(Long userId, Long courseId);

    List<OverallProgressEntity> getUserAllOverallProgresses(Long userId);
}
